package com.hujifang.elasticsearch.model;

import java.io.Serializable;
import java.util.List;

/**
 * Es分组统计
 * Created by Hurricane.Hu on 2016/4/13.
 */
public class EsAggregation implements Serializable{
	private static final long serialVersionUID = -8324250673949720564L;
	/**
	 * 索引库
	 */
	private String index;
	/**
	 * 索引类型
	 */
	private List<String> types;
	/**
	 * 分组名称
	 */
	private String aggregationName;
	/**
	 * 分组字段名称
	 */
	private String fieldName;
	/**
	 * 是否查询缺失的数据
	 */
	private Boolean missing=false;
	/**
	 * 返回分组数据长度大小
	 */
	private Integer size;
	/**
	 * 分组字段类型
	 */
	private String fieldType;
	/**
	 * DateHistogram
	 */
	private EsDateHistogram esDateHistogram;
	/**
	 * 子分组
	 */
	private EsAggregation subAggregation;
	/**
	 * 查询的AND条件
	 */
	private String mustCondition;
	/**
	 * 查询的非条件
	 */
	private String mustNotCondition;
	/**
	 * 查询的OR条件
	 */
	private String shouldCondition;
	/**
	 * 范围的查询条件
	 */
	private String rangeCondition;

	public String getIndex() {
		return index;
	}

	public void setIndex(String index) {
		this.index = index;
	}

	public List<String> getTypes() {
		return types;
	}

	public void setTypes(List<String> types) {
		this.types = types;
	}

	public String getAggregationName() {
		return aggregationName;
	}

	public void setAggregationName(String aggregationName) {
		this.aggregationName = aggregationName;
	}

	public String getFieldName() {
		return fieldName;
	}

	public void setFieldName(String fieldName) {
		this.fieldName = fieldName;
	}

	public String getFieldType() {
		return fieldType;
	}

	public void setFieldType(String fieldType) {
		this.fieldType = fieldType;
	}

	public EsDateHistogram getEsDateHistogram() {
		return esDateHistogram;
	}

	public void setEsDateHistogram(EsDateHistogram esDateHistogram) {
		this.esDateHistogram = esDateHistogram;
	}

	public EsAggregation getSubAggregation() {
		return subAggregation;
	}

	public void setSubAggregation(EsAggregation subAggregation) {
		this.subAggregation = subAggregation;
	}

	public String getMustCondition() {
		return mustCondition;
	}

	public void setMustCondition(String mustCondition) {
		this.mustCondition = mustCondition;
	}

	public String getMustNotCondition() {
		return mustNotCondition;
	}

	public void setMustNotCondition(String mustNotCondition) {
		this.mustNotCondition = mustNotCondition;
	}

	public String getShouldCondition() {
		return shouldCondition;
	}

	public void setShouldCondition(String shouldCondition) {
		this.shouldCondition = shouldCondition;
	}

	public Integer getSize() {
		return size;
	}

	public void setSize(Integer size) {
		this.size = size;
	}

	public String getRangeCondition() {
		return rangeCondition;
	}

	public void setRangeCondition(String rangeCondition) {
		this.rangeCondition = rangeCondition;
	}

	public Boolean getMissing() {
		return missing;
	}

	public void setMissing(Boolean missing) {
		this.missing = missing;
	}
}
